/**
 * ship-device edit
 */
let _this;
let _loading;
let shipId = "";shipName="";
layui.use(['form', 'tableSelect', 'layedit', 'laydate'], function () {
    let form,layer,tableSelect,layedit,laydate,$;
    form = layui.form,
        layer = layui.layer,
        tableSelect = layui.tableSelect,
        layedit = layui.layedit,
        laydate = layui.laydate,
        $ = layui.$;

    let u = localStorage.getItem("ADMIN_LOGIN");
    let loginU = {};
    if (u == undefined) {
        layer.msg('请登录', {icon: 1, time: 500}, function () {
            window.location = 'page/login.html';
        });
    } else {
        loginU = decryptLocalStorage(u);
    }
    // if(loginU.shipId!=0){
    //     shipId=loginU.shipId
    // }
    let _data = localStorage.getItem("paymentBillData");
    let viewData = undefined;

    if (_data != undefined) {
        viewData = decryptLocalStorage(_data, loginU.token);
        $("#shipId").val(viewData.shipId);
        $("#shipName").val(viewData.shipName);
        $("#siteName").val(viewData.siteName);
        $("#siteType").val(viewData.siteType);
        $("#contractNumber").val(viewData.contractNumber);
        $("#netType").val(viewData.netType);
        $("#model").val(viewData.model);
        $("#contractPeriod").val(viewData.contractPeriod);
        $("#contractPeriodStartDate").val(viewData.contractPeriodStartDate);
        $("#contractPeriodEndDate").val(viewData.contractPeriodEndDate);
        $("#rateInfo").val(viewData.rateInfo);
        $("#packageName").val(viewData.packageName);
        $("#packageType").val(viewData.packageType);
        $("#rnbFee").val(viewData.rnbFee);
        $("#usdFee").val(viewData.usdFee);
        $("#tempBandwidthUpgrade").val(viewData.tempBandwidthUpgrade);
        $("#tempStartDate").val(viewData.tempStartDate);
        $("#tempEndDate").val(viewData.tempEndDate);
        $("#outsourcingFee").val(viewData.outsourcingFee);
        $("#outgoingAmount").val(viewData.outgoingAmount);
        $("#settleAmount").val(viewData.settleAmount);
        $("#changeOperate").val(viewData.changeOperate);
        $("#usedCount").val(viewData.usedCount);
        $("#preferentialAmount").val(viewData.preferentialAmount);
        $("#transferAmount").val(viewData.transferAmount);
        $("#remark").val(viewData.remark);
    }

});
